home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / u_man / cat1 / pax.z / pax
Encoding:
Text File  |  2001-04-17  |  23.0 KB  |  529 lines

  1.  
  2.  
  3.  
  4. PPPPAAAAXXXX((((1111))))                                                                  PPPPAAAAXXXX((((1111))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      pax - portable archive exchange
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ppppaaaaxxxx [----ccccddddnnnnvvvv] [----EEEE _l_i_m_i_t] [----ffff _a_r_c_h_i_v_e] [----ssss _r_e_p_l_s_t_r ] ...  [----UUUU _u_s_e_r ] ...
  13.          [----GGGG _g_r_o_u_p ] ...  [----TTTT [_f_r_o_m__d_a_t_e][,_t_o__d_a_t_e] ] ...  [_p_a_t_t_e_r_n...]
  14.  
  15.      ppppaaaaxxxx ----rrrr [----ccccddddiiiikkkknnnnuuuuvvvvDDDDYYYYZZZZ] [----EEEE _l_i_m_i_t] [----ffff _a_r_c_h_i_v_e] [----oooo _o_p_t_i_o_n_s ] ...  [----pppp
  16.             _s_t_r_i_n_g ] ...  [----ssss _r_e_p_l_s_t_r ] ...  [----UUUU _u_s_e_r ] ...  [----GGGG _g_r_o_u_p ] ...
  17.             [----TTTT [_f_r_o_m__d_a_t_e][,_t_o__d_a_t_e] ] ...  [_p_a_t_t_e_r_n...]
  18.  
  19.      ppppaaaaxxxx ----wwww [----ddddiiiittttuuuuvvvvHHHHLLLLPPPPXXXX] [----bbbb _b_l_o_c_k_s_i_z_e] [[----aaaa] [----ffff _a_r_c_h_i_v_e]] [----xxxx _f_o_r_m_a_t] [----BBBB
  20.             _b_y_t_e_s] [----ssss _r_e_p_l_s_t_r ] ...  [----oooo _o_p_t_i_o_n_s ] ...  [----UUUU _u_s_e_r ] ...  [----GGGG
  21.             _g_r_o_u_p ] ...  [----TTTT [_f_r_o_m__d_a_t_e][,_t_o__d_a_t_e]][ /[_c][_m]]] ...  [_f_i_l_e...]
  22.  
  23.      ppppaaaaxxxx ----rrrrwwww [----ddddiiiikkkkllllnnnnttttuuuuvvvvDDDDHHHHLLLLPPPPXXXXYYYYZZZZ] [----pppp _s_t_r_i_n_g ] ...  [----ssss _r_e_p_l_s_t_r ] ...  [----UUUU _u_s_e_r
  24.              ] ...  [----GGGG _g_r_o_u_p ] ...  [----TTTT [_f_r_o_m__d_a_t_e][,_t_o__d_a_t_e][/[_c][_m]]] ...
  25.              [_f_i_l_e...]  directory
  26.  
  27. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  28.      _P_a_x reads and writes archive files which conform to the
  29.      AAAArrrrcccchhhhiiiivvvveeee////IIIInnnntttteeeerrrrcccchhhhaaaannnnggggeeee FFFFiiiilllleeee FFFFoooorrrrmmmmaaaatttt specified in _I_E_E_E _S_t_d. _1_0_0_3._1-_1_9_8_8.  _P_a_x
  30.      can also read, but not write, a number of other file formats in addition
  31.      to those specified in the AAAArrrrcccchhhhiiiivvvveeee////IIIInnnntttteeeerrrrcccchhhhaaaannnnggggeeee FFFFiiiilllleeee FFFFoooorrrrmmmmaaaatttt description.
  32.      Support for these traditional file formats, such as V7 _t_a_r and System V
  33.      binary _c_p_i_o format archives, is provided for backward compatibility and
  34.      to maximize portability.
  35.  
  36.      _P_a_x will also support traditional _c_p_i_o and System V _t_a_r interfaces if
  37.      invoked with the name "cpio" or "tar" respectively.  See the _c_p_i_o(_1) or
  38.      _t_a_r(_1) manual pages for more details.
  39.  
  40.      Combinations of the ----rrrr and ----wwww command line arguments specify whether _p_a_x
  41.      will read, write or list the contents of the specified archive, or move
  42.      the specified files to another directory.
  43.  
  44.      The command line arguments are:
  45.  
  46.      ----wwww   writes the contents of the file operands to the standard output in
  47.           an archive format. If no _f_i_l_e operands are specified, a list of
  48.           files to copy, one per line, will be read from the standard input. A
  49.           file of type directory will include all of the files in the file
  50.           hierarchy rooted at the file.
  51.  
  52.      ----rrrr   _P_a_x extracts the members of the archive file read from the standard
  53.           input, with pathnames matching the specified patterns. If an
  54.           extracted file is of type directory, the file hierarchy rooted at
  55.           that file will be extracted as well. The extracted files is created
  56.           relative to the current file hierarchy. By default, the owner and
  57.           group of selected files will be that of the invoking process, and
  58.           the permissions and modification times will be the sames as those in
  59.           the archive.
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. PPPPAAAAXXXX((((1111))))                                                                  PPPPAAAAXXXX((((1111))))
  71.  
  72.  
  73.  
  74.           The supported archive formats are automatically detected on input.
  75.           The default output format is _u_s_t_a_r, but may be overridden by the ----xxxx
  76.           _f_o_r_m_a_t option described below.
  77.  
  78.      ----rrrrwwww  _P_a_x copies the file operands to the destination directory. If no
  79.           _f_i_l_e operands are specified, a list of files to copy, one per line,
  80.           will be read from the standard input. A file of type directory will
  81.           include all of the files in the file hierarchy rooted at the file.
  82.           The directory named by the _d_i_r_e_c_t_o_r_y operand must exist and have the
  83.           proper permissions before the copy can occur.
  84.  
  85.      If neither the ----rrrr or ----wwww options are given, then _p_a_x will list the
  86.      contents of the specified archive.  In this mode, _p_a_x lists normal files
  87.      one per line, hard link pathnames as
  88.  
  89.                _p_a_t_h_n_a_m_e == _l_i_n_k_n_a_m_e
  90.  
  91.      and symbolic link pathnames (if supported by the implementation) as
  92.  
  93.                _p_a_t_h_n_a_m_e -> _l_i_n_k_n_a_m_e
  94.  
  95.      where _p_a_t_h_n_a_m_e is the name of the file being extracted, and _l_i_n_k_n_a_m_e is
  96.      the name of a file which appeared earlier in the archive.
  97.  
  98.      If the ----vvvv option is specified, then _p_a_x list normal pathnames in the same
  99.      format used by the _l_s utility with the ----llll option.  Hard links are shown
  100.      as
  101.  
  102.                <_l_s -_l _l_i_s_t_i_n_g> == _l_i_n_k_n_a_m_e
  103.  
  104.      and symbolic links (if supported) are shown as
  105.  
  106.                <_l_s -_l _l_i_s_t_i_n_g> -> _l_i_n_k_n_a_m_e
  107.  
  108.  
  109.      _P_a_x is capable of reading and writing archives which span multiple
  110.      physical volumes.  Upon detecting an end of medium on an archive which is
  111.      not yet completed, _p_a_x will prompt the user for the next volume of the
  112.      archive and will allow the user to specify the location of the next
  113.      volume.
  114.  
  115.    OOOOppppttttiiiioooonnnnssss
  116.      The following options are available:
  117.  
  118.      ----aaaa        Append files to the end of archive.
  119.  
  120.      ----bbbb _b_l_o_c_k_s_i_z_e
  121.                Block the output at _b_l_o_c_k_s_i_z_e bytes per write to the archive
  122.                file.  A kkkk suffix multiplies _b_l_o_c_k_i_n_g by 1024, a bbbb suffix
  123.                multiplies _b_l_o_c_k_i_n_g by 512 and a mmmm suffix multiplies _b_l_o_c_k_i_n_g
  124.                by 1048576 (1 megabyte).  For machines with 16-bit int's
  125.                (VAXen, XENIX-286, etc.), the maximum buffer size is 32k-1.  If
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. PPPPAAAAXXXX((((1111))))                                                                  PPPPAAAAXXXX((((1111))))
  137.  
  138.  
  139.  
  140.                not specified, _b_l_o_c_k_s_i_z_e is automatically determined on input
  141.                and is ignored for ----rrrrwwww....
  142.  
  143.      ----cccc        Match all file or archive members except those specified by the
  144.                _p_a_t_t_e_r_n or _f_i_l_e operands.
  145.  
  146.      ----dddd        Cause files of type directory being copied or archived or
  147.                archive members of type directory being extracted to match only
  148.                the file or archive member itself and not the file hierarchy
  149.                rooted at the file.
  150.  
  151.      ----ffff _a_r_c_h_i_v_e
  152.                The _a_r_c_h_i_v_e option specifies the pathname of the input or
  153.                output archive, overriding the default of standard input for ----rrrr
  154.                or standard output for ----wwww.
  155.  
  156.      ----iiii        Interactively rename files.  Substitutions specified by ----ssss
  157.                options (described below) are performed before requesting the
  158.                new file name from the user.  A file is skipped if an empty
  159.                line is entered and _p_a_x exits with an exit status of 0 if EEEEOOOOFFFF
  160.                is encountered.
  161.  
  162.      ----kkkk        Prevent the overwriting of existing files.
  163.  
  164.      ----llll        Files are linked rather than copied when possible.
  165.  
  166.      ----nnnn        When ----rrrr is specified, but ----wwww is not, the _p_a_t_t_e_r_n arguments are
  167.                treated as ordinary file names.  Only the first occurrence of
  168.                each of these files in the input archive is read.  The ppppaaaaxxxx
  169.                utility exits with a zero exit status after all files in the
  170.                list have been read.  If one or more files in the list is not
  171.                found, ppppaaaaxxxx writes a diagnostic to standard error for each of
  172.                the files and exits with a non-zero exit status.  the file
  173.                names are compared before either the ----iiii, or ----ssss, options are
  174.                applied.
  175.  
  176.      ----oooo _o_p_t_i_o_n_s
  177.                Provide information to the implementation to modify the
  178.                algorithm for extracting or writing files that is specific to
  179.                the file format specified by ----xxxx....
  180.  
  181.      ----pppp _s_t_r_i_n_g Specify one or more file characteristic options (privileges).
  182.                The _s_t_r_i_n_g option-argument must be a string specifying file
  183.                characteristics to be retained or discarded on extraction. The
  184.                string consists of the specification characters a, e, m, o and
  185.                p. Multiple characteristics can be concatenated within the same
  186.                string and multiple -p options can be specified. The meaning of
  187.                the specification characters are as follows:
  188.                aaaa Do not preserve file access times.
  189.                eeee Preserve the user ID, group ID, file mode, access time, and
  190.                modification time.
  191.                mmmm Do not preserve file modification times.
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. PPPPAAAAXXXX((((1111))))                                                                  PPPPAAAAXXXX((((1111))))
  203.  
  204.  
  205.  
  206.                oooo Preserve the user ID and group ID.
  207.                pppp Preserve the file mode bits.
  208.  
  209.                In the preceding list, "preserve" indicates that an attribute
  210.                stored in the archive will be given to the extracted file,
  211.                subject to the permissions of the invoking process; otherwise,
  212.                the attribute will be determined as part of the normal file
  213.                creation action.
  214.  
  215.                If neither the e nor the o specification character is
  216.                specified, or the user ID and group ID are not preserved for
  217.                any reason, pax will not set the S_ISUID and S_ISGID bits of
  218.                the file mode.
  219.  
  220.                If the preservation of any of these items fails for any reason,
  221.                pax will write a diagnostic message to standard error.  Failure
  222.                to preserve these items will affect the final exit status, but
  223.                will not cause the extracted file to be deleted.
  224.  
  225.                If file-characteristic letters in any of the string option-
  226.                arguments are duplicated or conflict with each other, the ones
  227.                given last will take precedence. For example, if -p eme is
  228.                specified, file modification times will be preserved.
  229.  
  230.      ----ssss _r_e_p_l_s_t_r
  231.                File names are modified according to the substitution
  232.                expression using the syntax of _e_d(_1) as shown:
  233.  
  234.                          -s /_o_l_d/_n_e_w/[[[[gp]]]]
  235.  
  236.                Any non null character may be used as a delimiter (a / is used
  237.                here as an example).  Multiple ----ssss expressions may be specified;
  238.                the expressions are applied in the order specified terminating
  239.                with the first successful substitution.  The optional trailing
  240.                pppp causes successful mappings to be listed on standard error.
  241.                The optional trailing gggg causes the _o_l_d expression to be
  242.                replaced each time it occurs in the source string.  Files that
  243.                substitute to an empty string are ignored both on input and
  244.                output.
  245.  
  246.      ----tttt        Cause the access times of the archived files to be the same as
  247.                they were before being read by pax.  ----rrrr and standard output for
  248.                ----wwww.
  249.  
  250.      ----uuuu        Copy each file only if it is newer than a pre-existing file
  251.                with the same name.  This implies ----aaaa.
  252.  
  253.      ----vvvv        List file names as they are encountered.  Produces a verbose
  254.                table of contents listing on the standard output when both ----rrrr
  255.                and ----wwww are omitted, otherwise the file names are printed to
  256.                standard error as they are encountered in the archive.
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. PPPPAAAAXXXX((((1111))))                                                                  PPPPAAAAXXXX((((1111))))
  269.  
  270.  
  271.  
  272.      ----xxxx _f_o_r_m_a_t Specifies the output archive _f_o_r_m_a_t.  The input format, which
  273.                must be one of the following, is automatically determined when
  274.                the ----rrrr option is used.  The supported formats are:
  275.  
  276.                _c_p_i_o   The extended _C_P_I_O interchange format specified in
  277.                       EEEExxxxtttteeeennnnddddeeeedddd CCCCPPPPIIIIOOOO FFFFoooorrrrmmmmaaaatttt iiiinnnn _I_E_E_E _S_t_d. _1_0_0_3._1-_1_9_8_8.
  278.  
  279.                _u_s_t_a_r  The extended _T_A_R interchange format specified in
  280.                       EEEExxxxtttteeeennnnddddeeeedddd TTTTAAAARRRR FFFFoooorrrrmmmmaaaatttt iiiinnnn _I_E_E_E _S_t_d. _1_0_0_3._1-_1_9_8_8. This is
  281.                       the default archive format.
  282.  
  283.      ----BBBB _b_y_t_e_s  Non-standard option on number of bytes written on a single
  284.                archive volume.
  285.  
  286.      ----DDDD        On extraction check file inode change time before the
  287.                modification of the file name. Non standard option.
  288.  
  289.      ----EEEE _l_i_m_i_t  Non-standard limit on read faults 0 indicates stop after first
  290.                error, values indicate a limit, "NONE" try forever
  291.  
  292.      ----GGGG _g_r_o_u_p  Non-standard option for selecting files within an archive by
  293.                group (gid or name)
  294.  
  295.      ----HHHH        Follow command line symlinks only.  Non standard option.
  296.  
  297.      ----LLLL        Follow symlinks.  Non standard option.
  298.  
  299.      ----PPPP        Do NOT follow symlinks (default).
  300.  
  301.      ----TTTT _f_r_o_m__d_a_t_e,_t_o__d_a_t_e
  302.                Non-standard option for selecting files within an archive by
  303.                modification time range (lower,upper)
  304.  
  305.      ----UUUU _u_s_e_r   Non-standard option for selecting files within an archive by
  306.                user (uid or name).
  307.  
  308.      ----XXXX        Do not pass over mount points in the file system.  Non standard
  309.                option.
  310.  
  311.      ----YYYY        On extraction check file inode change time after the
  312.                modification of the file name. Non standard option.
  313.  
  314.      ----ZZZZ        On extraction check modification time after the modification of
  315.                the file name. Non standard option.
  316.  
  317.      When writing to an archive, the standard input is used as a list of
  318.      pathnames if no _p_a_t_h_n_a_m_e operands are specified.  The format is one
  319.      pathname per line.  Otherwise, the standard input is the archive file,
  320.      which is formatted according to one of the specifications in
  321.      AAAArrrrcccchhhhiiiivvvveeee////IIIInnnntttteeeerrrrcccchhhhaaaannnnggggeeee FFFFiiiilllleeee ffffoooorrrrmmmmaaaatttt in _I_E_E_E _S_t_d. _1_0_0_3._1-_1_9_8_8, or some other
  322.      implementation-defined format.
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. PPPPAAAAXXXX((((1111))))                                                                  PPPPAAAAXXXX((((1111))))
  335.  
  336.  
  337.  
  338.      The user ID and group ID of the process, together with the appropriate
  339.      privileges, affect the ability of _p_a_x to restore ownership and
  340.      permissions attributes of the archived files.  (See _f_o_r_m_a_t-_r_e_a_d_i_n_g
  341.      _u_t_i_l_i_t_y in AAAArrrrcccchhhhiiiivvvveeee////IIIInnnntttteeeerrrrcccchhhhaaaannnnggggeeee FFFFiiiilllleeee FFFFoooorrrrmmmmaaaatttt in _I_E_E_E _S_t_d. _1_0_0_3._1-_1_9_8_8.)
  342.  
  343.    OOOOppppeeeerrrraaaannnnddddssss
  344.      The following operands are available:
  345.  
  346.      _d_i_r_e_c_t_o_r_y The destination directory pathname for copies when both the ----rrrr
  347.                and ----wwww options are specified.  The directory must exist and be
  348.                writable before the copy or and error results.
  349.  
  350.      _f_i_l_e      A pathname of a file to be copied or archived. When a directory
  351.                is named, all of its files and (recursively) subdirectories are
  352.                copied as well.
  353.  
  354.      _p_a_t_t_e_r_n   A _p_a_t_t_e_r_n is given in the standard shell pattern matching
  355.                notation.  The default if no _p_a_t_t_e_r_n is  specified is ****, which
  356.                selects all files.
  357.  
  358. EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  359.      The following command
  360.  
  361.                pax -w -f /dev/rmt0 .
  362.  
  363.      copies the contents of the current directory to tape drive 0.
  364.  
  365.      The commands
  366.  
  367.                mkdir _n_e_w_d_i_r
  368.                cd _o_l_d_d_i_r
  369.                pax -rw . _n_e_w_d_i_r
  370.  
  371.      copies the contents of _o_l_d_d_i_r to _n_e_w_d_i_r .
  372.  
  373.      The command
  374.  
  375.                pax -r -s ',//*usr//*,,' -f pax.out
  376.  
  377.      reads the archive ppppaaaaxxxx....oooouuuutttt with all files rooted in "/usr" in the archive
  378.      extracted relative to the current directory.
  379.  
  380. FFFFIIIILLLLEEEESSSS
  381.      /dev/tty  used to prompt the user for information when the ----iiii option are
  382.                specified.
  383.  
  384. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  385.      cpio(1), find(1), tar(1), cpio(5), tar(5)
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. PPPPAAAAXXXX((((1111))))                                                                  PPPPAAAAXXXX((((1111))))
  401.  
  402.  
  403.  
  404. DIAGNOSTICS
  405.      _P_a_x will terminate immediately, without processing any additional files
  406.      on the command line or in the archive.
  407.  
  408. EEEEXXXXIIIITTTT CCCCOOOODDDDEEEESSSS
  409.      _P_a_x will exit with one of the following values:
  410.  
  411.      0    All files in the archive were processed successfully.
  412.  
  413.      >0   _P_a_x aborted due to errors encountered during operation.
  414.  
  415. BBBBUUUUGGGGSSSS
  416.      Special permissions may be required to copy or extract special files.
  417.  
  418.      Device, user ID, and group ID numbers larger than 65535 cause additional
  419.      header records to be output.  These records are ignored by some
  420.      historical version of _c_p_i_o(_1) and _t_a_r(_1).
  421.  
  422.      The archive formats described in AAAArrrrcccchhhhiiiivvvveeee////IIIInnnntttteeeerrrrcccchhhhaaaannnnggggeeee FFFFiiiilllleeee FFFFoooorrrrmmmmaaaatttt have
  423.      certain restrictions that have been carried over from historical usage.
  424.      For example, there are restrictions on the length of pathnames stored in
  425.      the archive.
  426.  
  427.      When getting an "ls -l" style listing on _t_a_r format archives, link counts
  428.      are listed as zero since the _u_s_t_a_r archive format does not keep link
  429.      count information.
  430.  
  431.      On 16 bit architectures, the largest buffer size is 32k-1.  This is due,
  432.      in part, to using integers in the buffer allocation schemes, however, on
  433.      many of these machines, it is not possible to allocate blocks of memory
  434.      larger than 32k.
  435.  
  436. CCCCOOOOPPPPYYYYRRRRIIIIGGGGHHHHTTTT
  437.      Copyright (c) 1989 Mark H. Colburn.
  438.      All rights reserved.
  439.  
  440.      Redistribution and use in source and binary forms are permitted provided
  441.      that the above copyright notice is duplicated in all such forms and that
  442.      any documentation, advertising materials, and other materials related to
  443.      such distribution and use acknowledge that the software was developed by
  444.      Mark H. Colburn and sponsored by The USENIX Association.
  445.  
  446.      THE SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
  447.      WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  448.      MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  449.  
  450. AAAAUUUUTTTTHHHHOOOORRRR
  451.      Mark H. Colburn
  452.      Minnetech Consulting, Inc.
  453.      117 Mackubin Street, Suite 1
  454.      St. Paul, MN 55102
  455.      mark@jhereg.MN.ORG
  456.  
  457.  
  458.  
  459.                                                                         PPPPaaaaggggeeee 7777
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466. PPPPAAAAXXXX((((1111))))                                                                  PPPPAAAAXXXX((((1111))))
  467.  
  468.  
  469.  
  470.      Sponsored by TTTThhhheeee UUUUSSSSEEEENNNNIIIIXXXX AAAAssssssssoooocccciiiiaaaattttiiiioooonnnn for public distribution.
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.                                                                         PPPPaaaaggggeeee 8888
  526.  
  527.  
  528.  
  529.